<!doctype html>
<html ng-app="app">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../build/common/base.css" rel="stylesheet">
<script type="text/javascript" src="../../build/common/base.js"></script>
<script type="text/javascript" src="../../build/common/ngEdit.js"></script>
</head>
<script type="text/javascript">
	var id = $.getParam("id");
	var app = angular.module('app', [ 'baseDirective' ]);
	app.controller("ctrl", [ '$scope', 'baseService','ArrayToolService', 
		function($scope, baseService,ArrayToolService) {
			$scope.ArrayTool = ArrayToolService;
			$scope.isSaveEd = id;
			if(id){
				//$("#orderNum").attr("readonly","readonly");
			}else{
			}
		
			/**
			 * 数据初始化。
			 */
			$scope.init=function(){
				if(!$scope.data){
					$scope.data={};
				}
			};
			
			
			} ]);

</script>
<body class="panel success" ng-controller="ctrl" id="customerContractEdit">
	<!-- 顶部按钮 -->
	<div class="panel-heading">
		<a href="javascript:void(0)"
			class="btn btn-sm btn-primary fa-reply"
			onclick="javascript:$.Dialog.close(window);"> 返回 </a>
	</div>
	<!--  ab-load 去controller 层获取业务数据  -->
	<form name="form" method="post" ab-load="crm/customerContract/get?id={id}"
		ng-model="data">

		<table class="form-table">
			<tbody>
				<tr class="firstRow">
					<th>合同编号</th>
					<td>
					{{data.orderNum}}	
					</td>
				</tr>
				<tr>
					<th>
						<span>成交客户</span>
						<span class="required">*</span>
					</th>
					<td>
						<span ng-repeat="customer in data.customerList" style="margin-right: 10px" class="label label-danger"> {{customer.name}}
						</span>
					</td>
				</tr>
				<tr>
					<th>主题</th>
					<td>
						{{data.subject}}
					</td>
				</tr>
				<tr>
					<th>签约时间</th>
					<td>
						{{data.contractTime}}
					</td>
				</tr>
				<tr>
					<th>开始时间</th>
					<td>
						{{data.startTime}}
					</td>
				</tr>
				<tr>
					<th>结束时间</th>
					<td>
						{{data.endTime}}
					</td>
				</tr>
				
				
				<tr >
					<th>是否含税</th>
					<td><div ng-model="data.isTax"
							ab-validate="{}" desc="是否含税">
							<label class=" radio-inline"><input type="radio" class="typeInput" ng-disabled="true"
								ng-model="data.isTax" value="0" />否</label><label
								class=" radio-inline"><input type="radio" class="typeInput" ng-disabled="true"
								ng-model="data.isTax" value="1" />是</label>
						</div></td>
				</tr>
				<tr >
					<th>是否提供发票</th>
					<td><div ng-model="data.isInvoice"
							ab-validate="{}" desc="是否提供发票">
							<label class=" radio-inline"><input type="radio" class="typeInput" ng-disabled="true"
								ng-model="data.isInvoice" value="0" />否</label><label
								class=" radio-inline"><input type="radio" class="typeInput" ng-disabled="true"
								ng-model="data.isInvoice" value="1" />是</label>
						</div></td>
				</tr>
				<tr>
					<th>总金额</th>
					<td>
						{{data.money}}
					</td>
				</tr>
				<tr>
					<th>备注</th>
					<td>
						{{data.remark}}
					</td>
				</tr>
				<tr>
					<th>
						<span>包含产品:</span>
					</th>
					<td>
						<span ng-repeat="relation in data.customerRelationList |filter:{type:'contractProduct'}" style="margin-right: 10px" class="label label-danger"> {{relation.productName}}
						</span>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
</body>
</html>